package logic.algorithm;
import java.util.Comparator;

import datamodel.GridElement;

/**
 * 
 */

/**
 * @author toa, Kevin Munk
 * @version 0.1
 *
 */
public class ComparatorEstimateDistance implements Comparator<GridElement> {


	/* (non-Javadoc)
	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
	 */
	@Override
	public int compare(GridElement o1, GridElement o2) {
		if(o1.getEstimateDistance() < o2.getEstimateDistance())
			return -1;
		else if(o1.getEstimateDistance() > o2.getEstimateDistance())
			return 1;
		else 
			return 0;
	}

}
